﻿using UnityEngine;
using System.Collections.Generic;
using Dict.DataModel;

namespace Dict.Blo
{
    public class DictUnionFightNpcBlo
    {
        static public List<TableUnionFightNpc> GetAll()
        {
            return DictDataManager.Instance.tableUnionFightNpcDao.CacheList;
        }

        static public TableUnionFightNpc GetOne(string id)
        {
            return DictDataManager.Instance.tableUnionFightNpcDao.GetById(id);
        }

        static public Vector3 GetPosition(string id)
        {
            var one = GetOne(id);
            var pos = one.Position;
            var sss = pos.Split(new char[1] { ',' }, System.StringSplitOptions.RemoveEmptyEntries);
            var x = float.Parse(sss[0]);
            var y = float.Parse(sss[1]);
            var z = float.Parse(sss[2]);

            return new Vector3(x, y, z);
        }
        
    }
}